package com.itheima.idea;

public class Demo5Method {
    public static void main(String[] args) {
        int[] arr = {100,64,98,21,64,37,65};
        s(arr);
        for (int i = 0; i < arr.length; i++){
            System.out.println(arr[i]);
        }
    }




    public static void s(int arr[]){

        int max = arr[0];
        int Index = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] > max){
                max = arr[i];
                Index = i;
            }


    }
        arr[Index] -= 10;
        System.out.println(Index);
        System.out.println("--------------");

}
}